package com.ebai.product.management.model.entity;


import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "t_global_dict")
public class Dict extends BaseEntity implements Serializable, Comparable<Dict> {

    private static final long serialVersionUID = 1L;
    
    @Transient
    private String order;

    public String getOrder() {
        return dataCode;
    }

    public int compareTo(Dict arg0){
        return this.getOrder().compareTo(arg0.getOrder());
    }

    @Id
    @GeneratedValue(generator="idGenerator")
    @GenericGenerator(name="idGenerator", strategy="uuid")
    @Column(name = "PID", length = 36)
    private String pid;

    @Column(name = "DATA_TYPE", length = 50)
    private String dataType;

    @Column(name = "DATA_CODE", length = 50)
    private String dataCode;

    @Column(name = "DATA_TEXT", length = 100)
    private String dataText;
    
    @Column(name = "DATA_PXH")
    private long dataPxh;

    @Column(name = "PARENT_ID", length = 36)
    private String parentId;

    @Column(name = "GROUP_CODE", length = 50)
    private String groupCode;

    @Column(name = "GROUP_TEXT", length = 100)
    private String groupText;

    @Column(name = "IS_ENABLE", length = 50)
    private String isEnable;

    @Column(name = "IS_DELETE", length = 50)
    private String isDelete;
    
    @Column(name = "MEMO", length = 255)
    private String memo;

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getDataCode() {
        return dataCode;
    }

    public void setDataCode(String dataCode) {
        this.dataCode = dataCode;
    }

    public String getDataText() {
        return dataText;
    }

    public void setDataText(String dataText) {
        this.dataText = dataText;
    }

    public long getDataPxh() {
		return dataPxh;
	}

	public void setDataPxh(long dataPxh) {
		this.dataPxh = dataPxh;
	}

	public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    public String getGroupText() {
        return groupText;
    }

    public void setGroupText(String groupText) {
        this.groupText = groupText;
    }

    public String getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(String isEnable) {
        this.isEnable = isEnable;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
    
}
